import { Component, OnInit, ChangeDetectionStrategy, EventEmitter, Input, Output } from '@angular/core';

@Component({
  selector: 'el-pagination-btn',
  templateUrl: './button.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ButtonComponent implements OnInit {
  @Input() dir: string = '';
  @Input() disabled: boolean = false;
  @Output() next: EventEmitter<number> = new EventEmitter();
  constructor() { }

  ngOnInit(): void {
  }

  clickHandle(step: number) {
    if (this.disabled)
      return;
    this.next.emit(step);
  }
}
